home *** CD-ROM | disk | FTP | other *** search
- ` ------------------------------------------------------------------------
- ` ImageScroller DarkForge Snippet (20/8/2000)
- ` ------------------------------------------------------------------------
- ` Scroll around a full-screen zoomed-in image using mouse or cursor keys.
- ` Hold down left button for extra scroll speed.
-
- sync rate 0
- sync on
- hide mouse
-
- load bitmap "anhk_inside.bmp",1
-
- speed=4 : x=0 : y=0
-
- do
-
- copy bitmap 1,x,y,x+180,y+120,0,0,0,639,479
-
- if rightkey()=1 or mousemovex()>0
- if mouseclick()=1
- inc x,speed*4
- else
- inc x,speed
- endif
- if x>(640-181) then x=640-181
- endif
-
- if leftkey()=1 or mousemovex()<0
- if mouseclick()=1
- dec x,speed*4
- else
- dec x,speed
- endif
- if x<0 then x=0
- endif
-
- if downkey()=1 or mousemovey()>0
- if mouseclick()=1
- inc y,speed*4
- else
- inc y,speed
- endif
- if y>(480-121) then y=480-121
- endif
-
- if upkey()=1 or mousemovey()<0
- if mouseclick()=1
- dec y,speed*4
- else
- dec y,speed
- endif
- if y<0 then y=0
- endif
-
- sync
-
- loop
-
-